const express = require('express');
const db = require('../db/index');
const Students = require('../models/studentsSchema');
const router = new express.Router();

router.get('/test', (req, res) => {
    console.log(req.query);
    res.send('test');
})
router.post('/register', async (req, res) => {
    await db;
    console.log(req.body);
    const result = await Students.create(req.body);
    console.log(result);
    res.send("注册成功");
})

module.exports = router;